$(function () {

    $("body").css("opacity","1")

    $("#xiugaixinxi").click(function () {
        console.log(1);
        $(this).css({"background-color": "#007dd2", "color": "white"})
        $("#zhucexinxi").css({"background-color": "white", "color": "black"})
        $("#zcxxt").hide(500)  
        $("#xgxxt").show(500)  
    });

    $("#zhucexinxi").click(function () {
        console.log(1);
        $(this).css({"background-color": "#007dd2", "color": "white"})
        $("#xiugaixinxi").css({"background-color": "white", "color": "black"})
        $("#zcxxt").show(500)
        $("#xgxxt").hide(500)
    });

    var username = localStorage.getItem("username");

    $.post("/xjxt/jsgerenxinxi?username="+ username +"",function(res){

        var hehe = JSON.parse(res);
        console.log(hehe);
        $("#bsnumber").html(hehe[0].bsnumber);
        $("#gnumber").html(hehe[0].gnumber);
        $("#name").html(hehe[0].name);
        $("#sex").html(hehe[0].sex);
        $("#birthday").html(hehe[0].birthday);
        $("#ID").html(hehe[0].ID);
        $("#nation").html(hehe[0].nation);
        $("#school").html(hehe[0].school);
        $("#nschool").html(hehe[0].nschool);
        $("#xueli").html(hehe[0].xueli);
        $("#xuezhi").html(hehe[0].xuezhi);
        $("#jiankang").html(hehe[0].jiankang);
        $("#hunyin").html(hehe[0].hunyin);
        $("#inday").html(hehe[0].inday);
        $("#zaibian").html(hehe[0].zaibian);
        $("#oldname").html(hehe[0].oldname);
        $("#class1").html(hehe[0].class);
        $("#nianji").html(hehe[0].nianji);
        $("#byyear").html(hehe[0].byyear);
        $("#inschool").html(hehe[0].inschool);
        $("#zhuanye").html(hehe[0].zhuanye);
        $("#address").html(hehe[0].address);
        $("#name1").html(hehe[0].name);
        $("#gnumber1").html(hehe[0].gnumber);
        $("#mingzu").val(hehe[0].nation1);
        $("#jiguan3").val(hehe[0].jiguan);
        $("#tongxun3").val(hehe[0].tongxun);
        $("#youjian3").val(hehe[0].youjian);
        $("#dianhua3").val(hehe[0].dianhua);
        $("#username").val(hehe[0].username);
        $("#touxiang").attr("src",hehe[0].touxiang);
    });

});